<?php
  if(command("join",30)){
    SendCommand("JOIN ".$paramA[0]);
  }
  if(command("part",30)){
    SendCommand("PART ".$paramA[0]." :".$after_param);
  }
  if(command("cycle",30)){
    SendCommand("PART ".$paramA[0]." :".$after_param."\r\nJOIN ".$paramA[0]);
  }
  if(command("quit",50)){
    if(!empty($after_param)){
      SendCommand("QUIT :$after_param");
    } else {
      SendCommand("QUIT :Woof Woof!");
    }
    die();
  }
  if(command("raw",50)){
    if(!empty($param)){
      SendCommand($param);
    }
  }
  if(command("network",50)){
    $network=$param;
    $port=6667;
    if(stristr($network,":")){
      $networkA=explode(":",$network);
      $network=$networkA[0];
      $port=(int)$networkA[1];
    }
    SendCommand("QUIT :Off to $network...");
  }

  if(command("memory")){
    SendCommand("PRIVMSG $channel :Currently using ".memUsed()." memory.");
  }
?>